package com.jpa.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.data.domain.Example;

import com.alibaba.dubbo.config.annotation.Service;
import com.jpa.dao.IUseradminDao;
import com.jpa.entity.Useradmin;
import com.jpa.service.UseradminService;
@Service(version = "1.0.0",interfaceName="UseradminService")
public class UseradminServiceImpl implements UseradminService{
	@Autowired
	IUseradminDao ud;

	@Override
	@Cacheable(value = "findUseradminByNameAndPassword", unless = "#result eq null")
	public Useradmin findUseradminByNameAndPassword(Useradmin useradmin) {
		// TODO Auto-generated method stub
		Example<Useradmin> example=Example.of(useradmin);
		return 	ud.findOne(example);
	}


}
